package coder.nav.enums;

import coder.nav.model.vo.NavListVO;
import coder.nav.model.vo.setting.*;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum NavSettingEnums {

    USERNAME("username", "👻", "用户昵称", String.class),
    PASSWORD("password", "🔑", "重置密码", String.class),
    NOTICE("notice", "✉️", "消息推送", NavNoticeSettingVO.class),
    MEMO("memo", "📌", "记事本", NavMemoSettingVO.class),
    CASH("cash", "💰", "记账本", NavCashSettingVO.class),
    NAV("nav", "🧭", "导航列表", NavListVO.class),
    IDE("ide", "🚥", "代码编辑器", NavIdeSettingVO.class),
    HINT_JAVA("hintJava", "☕", "代码补全（Java）", NavCodeMirrorHintVO.class),
    HINT_PHP("hintPHP", "🐘", "代码补全（PHP）", NavCodeMirrorHintVO.class),
    HINT_JAVASCRIPT("hintJS", "🟡", "代码补全（JS）", NavCodeMirrorHintVO.class),
    ;

    private final String key;
    private final String icon;
    private final String value;
    private final Class<?> clazz;

    public static NavSettingEnums getByKey(String key) {
        NavSettingEnums[] es = NavSettingEnums.values();
        for(NavSettingEnums e : es) {
            if(e.getKey().equals(key)) {
                return e;
            }
        }
        return null;
    }

}
